package com.cd.schedule.jpa.repo;

import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
import com.cd.schedule.jpa.domain.ScheduleEntity;

import java.util.List;

@Repository
@Transactional
public interface ScheduleEntityRepo extends CrudRepository<ScheduleEntity, Long> {

    List<ScheduleEntity> findByUserId(Long userId);

    long deleteByScheduleId(Long scheduleId);

    List<ScheduleEntity> findByUserIdAndDate(Long userId, String date);


}
